export const importConfig = {
	tabSteps: [
		{
			label: '下载模板',
			download: '下载模板',
			active: 1,
			rules: [
				{
					label: '下载最新导入模板。共1个：',
					children: [
						{
							label: '《疫情防控数据模板》',
							link: true,
							url: 'view_dpOrgPreventRecord_downloadTemplate',
						},
					],
				},
			],
		},
		{
			label: '导入信息',
			description: '',
			uploadTip: '疫情防控数据',
			active: 2,
			url: 'view_dpOrgPreventRecord_import',
			code: 3039,
			rules: [
				{
					label: '导入规则说明:',
					children: [
						{
							label: '(1)导入模式为“覆盖导入”，待导入的信息会覆盖平台已存在的',
						},
					],
				},
			],
		},
	],
	dataType: 90,
}

export const formConfig = {
	inline: false,
	showBtn: true,
	labelPosition: 'top',
	column: [
		{
			label: '养老机构统一信用代码',
			prop: 'creditCode',
			maxlength: '18',
			showWordLimit: true,
			type: 'text',
			span: 8,
			labelPosition: 'top',
		},
		{
			label: '养老机构名称',
			prop: 'organizationName',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			labelPosition: 'top',
			span: 8,
		},

		{
			label: '姓名',
			prop: 'personName',
			type: 'input',
			span: 8,
		},
		{
			label: '身份证号',
			prop: 'idCard',
			type: 'input',
			span: 8,
		},
		{
			label: '人员类别',
			prop: 'personType',
			propName: 'personTypeLabel',
			type: 'select',
			dicData: [
				{ label: '老人', value: 1 },
				{ label: '员工', value: 2 },
			],
			span: 8,
		},
		{
			label: '体温',
			prop: 'temperature',
			type: 'input',
			span: 8,
			append: '℃',
		},
		{
			label: '干咳',
			prop: 'dryCoughFlag',
			propName: 'dryCoughFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '乏力',
			prop: 'feebleFlag',
			propName: 'feebleFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '鼻塞',
			prop: 'stuffyNoseFlag',
			propName: 'stuffyNoseFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '流涕',
			prop: 'runnyFlag',
			propName: 'runnyFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '咽痛',
			prop: 'soreThroatFlag',
			propName: 'soreThroatFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '嗅/味觉减退',
			prop: 'hypogeusiaFlag',
			propName: 'hypogeusiaFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '结膜炎',
			prop: 'conjunctivitisFlag',
			propName: 'conjunctivitisFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '肌痛',
			prop: 'myalgiaFlag',
			propName: 'myalgiaFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '腹泻',
			prop: 'diarrhea',
			propName: 'diarrheaLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '其他',
			prop: 'otherInfo',
			type: 'input',
			span: 8,
		},

		{
			label: '填报人姓名',
			prop: 'informantName',
			type: 'input',
			span: 8,
		},
		{
			label: '填报时间',
			prop: 'informantTime',
			type: 'date',
			format: 'YYYY年MM月DD',
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			span: 8,
		},
		{
			label: '备注',
			prop: 'preventNote',
			type: 'input',
			span: 24,
		},
	],
}

export const searchConfig = {
	inline: true,
	showBtn: true,
	labelPosition: 'left',
	column: [
		{
			label: '人员类别',
			prop: 'personType',
			propName: 'personTypeLabel',
			type: 'select',
			dicData: [
				{ label: '老人', value: 1 },
				{ label: '员工', value: 2 },
			],
			span: 8,
		},
		{
			label: '姓名',
			prop: 'personName',
			type: 'input',
			span: 8,
		},
		{
			label: '填报人姓名',
			prop: 'informantName',
			type: 'input',
			span: 8,
		},
	],
}

export const tableConfig = {
	stripe: true,
	border: true,
	columns: [
		{ label: '姓名', prop: 'personName' },
		{
			label: '人员类别',
			prop: 'personTypeLabel',
		},
		{
			label: '体温',
			prop: 'temperature',
			type: 'input',
			span: 8,
			append: '℃',
		},
		{
			label: '干咳',
			prop: 'dryCoughFlag',
			propName: 'dryCoughFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '乏力',
			prop: 'feebleFlag',
			propName: 'feebleFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '鼻塞',
			prop: 'stuffyNoseFlag',
			propName: 'stuffyNoseFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '流涕',
			prop: 'runnyFlag',
			propName: 'runnyFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '咽痛',
			prop: 'soreThroatFlag',
			propName: 'soreThroatFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '嗅/味觉减退',
			prop: 'hypogeusiaFlag',
			propName: 'hypogeusiaFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '结膜炎',
			prop: 'conjunctivitisFlag',
			propName: 'conjunctivitisFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '肌痛',
			prop: 'myalgiaFlag',
			propName: 'myalgiaFlagLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '腹泻',
			prop: 'diarrhea',
			propName: 'diarrheaLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{ label: '填报人姓名', prop: 'informantName' },
		{ label: '填报时间', prop: 'informantTime' },
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}

export const api = {
	index: 'view_dpOrgPreventRecord_page',
	add: 'view_dpOrgPreventRecord_add',
	edit: 'view_dpOrgPreventRecord_edit',
	delete: 'view_dpOrgPreventRecord_del',
	import: 'view_dpOrgPreventRecord_import',
	export: 'view_dpOrgPreventRecord_export',
}
export const auth = {
	index: 'view_dpOrgPreventRecord_page',
	add: 'view_dpOrgPreventRecord_add',
	edit: 'view_dpOrgPreventRecord_edit',
	delete: 'view_dpOrgPreventRecord_del',
	import: 'view_dpOrgPreventRecord_import',
	export: 'view_dpOrgPreventRecord_export',
	mulitSet: 'mulitSet',
}
export const baseConfig = {
	pageName: '疫情防控数据',
	dictcodes: ['COMMON_FLAG'],
	rowKey: 'id',
	addLabel: '新增',
	tipLabel: 'personName',
	exportMqTopic: '/ning/export/',
	paramsObj: {
		code: 3032,
	},
	api,
	auth,
	menuBtn: [
		{
			icon: 'editor',
			label: '编辑',
			type: 'primary',
			operate: 'edit',
			auth: auth.edit,
			text: true,
			show: true,
		},
		{
			icon: 'detail',
			label: '查看详情',
			type: 'primary',
			operate: 'detail',
			auth: '',
			text: true,
			show: true,
		},
		{
			icon: 'delete',
			label: '删除',
			type: 'danger',
			operate: 'delete',
			auth: auth.delete,
			text: true,
			show: true,
		},
	],

	saveFormate: async (form) => {
		return new Promise((resolve, reject) => {
			resolve(form)
		})
	},
	dialogConfig: {
		width: '75%',
	},
	searchConfig,
	formConfig,
	tableConfig,
	importConfig,
	detailConfig: formConfig,
}
